//
//  VersionController.m
//  云成绩
//
//  Created by apple on 2017/6/26.
//  Copyright © 2017年 zj. All rights reserved.
//

#import "VersionController.h"
#import "AppDelegate.h"
#import "HttpTool.h"
@interface VersionController ()

@property (nonatomic, weak) UIImageView *background;


@property (nonatomic, assign) BOOL isDidAppear;

@end

@implementation VersionController {
    NSDictionary *versionData;
}


- (BOOL)prefersHomeIndicatorAutoHidden{
    return YES;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    UIImageView *background = [[UIImageView alloc] initWithFrame:self.view.bounds];
    background.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    CGSize viewSize = [UIScreen mainScreen].bounds.size;
    // 竖屏
//    NSString *viewOrientation = @"Portrait";
//    NSString *launchImageName = @"LaunchImage-800-667h";
//    NSArray* imagesDict = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"UILaunchImages"];
//    for (NSDictionary* dict in imagesDict)
//    {
//        CGSize imageSize = CGSizeFromString(dict[@"UILaunchImageSize"]);
//        if (CGSizeEqualToSize(imageSize, viewSize) && [viewOrientation isEqualToString:dict[@"UILaunchImageOrientation"]])
//        {
//            launchImageName = [NSString stringWithFormat:@"%@",dict[@"UILaunchImageName"]];
//        }
//    }
//    background.image = [UIImage imageNamed:];
    
//    [self.view addSubview:background];
    
    UIViewController *viewController = [[UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil] instantiateViewControllerWithIdentifier:@"LaunchScreen"];
    UIView *launchView = viewController.view;
    
    launchView.frame = self.view.bounds;
    [self.view addSubview:launchView];
    
    self.background = background;
    
    [self checkUpdateState];

}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:YES animated:animated];
}


- (void)checkUpdateState{
    [self handelData];
}
- (void)handelData{
   
    [HttpTool requestAD];
    
}



@end
